﻿using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;

namespace PropertyAppraisal.SystemManage
{
    public partial class AddDept : System.Web.UI.Page
    {
        private static DepartmentBll bll = new DepartmentBll();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        [WebMethod]
        public static bool AddDep(string name, string beizhu, int state)
        {
            SysDepartment de=new SysDepartment ();
            de.department_CreatePeople=HttpContext.Current.Session["UserName"].ToString();
            de.department_CreateTime=DateTime.Now;
            de.department_IsState=state;
            de.department_Name=name;
            de.department_Remarks=beizhu;
            if (bll.AddDep(de))
            {
                return true;
            }
            return false;
        }
    }
}